﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%template _header%>
<%namespace YouHP.Model%>
<%namespace YouHP.Model.Group%>
<%namespace YouHP.Utility%>
<link rel="stylesheet" href="/support/common/jquery-ui.css" type="text/css" />
<script type="text/javascript" src="/support/common/jquery.js"></script>
<script type="text/javascript" src="/support/common/ui.core.js"></script>
<script type="text/javascript" src="/support/common/ui.draggable.js"></script> 
<script type="text/javascript" src="/support/common/ui.resizable.js"></script> 
<script type="text/javascript" src="/support/common/ui.dialog.js"></script>
<div class="layout-cols2">
	<div class="col1">
		
 <%csharp%>TempUrl = ModuleCtrl.Header4("PatientSearch","搜索病友",false,false); <%/csharp%>
{TempUrl}
  <div  style="padding:5px 10px;">
				<div id="search-links" class="searchbox_0">
			          <img src="/support/Alpha/images/icon_search_results.gif" />
			          <%csharp%>string tmpStr = this.GetCondStr(this.cond) ; if(tmpStr.Length > 0) { <%/csharp%>
					  <label>您的搜索条件：</label>&nbsp;<font style="color:blue">{tmpStr}</font>					  
					  <%csharp%>} else {<%/csharp%>
					  所有病友
					  <%csharp%>} <%/csharp%>
					  <%csharp%>TempUrl = "/PatientAll.aspx" ;<%/csharp%>
					  &nbsp;&nbsp;&nbsp;<a href="{this.GetUrl(TempUrl)}">返回继续操作</a>					  
				</div>	
	</div>			
                  <%csharp%>TempUrl = ModuleCtrl.Footer("PatientSearch"); <%/csharp%>
                {TempUrl}

                		
                <%csharp%>TempUrl = ModuleCtrl.Header4("PatientList","病友列表",false,false); <%/csharp%>
                {TempUrl}

		
			<%csharp%> if(PatientDataList.Count == 0){ <%/csharp%>
                   <div class="content">
				<p><b>找不到相应的病友!!</b></p>
				</div>
				<%csharp%> } else { <%/csharp%>

	    <table  border="0" cellpadding="0" cellspacing="0" class="plist">
	      <tr align="center" style="height:30px;"> 
            <td width="10%" height="26" align="center"><b class="tdtitle">头像</b></td>

            <td width="20%"><b class="tdtitle">疾病</b></td>
            <td width="20%"><b class="tdtitle">性别/年龄/地区</b></td>
           
            <td width="35%"><b class="tdtitle"> 个人简介</b></td>
            <%csharp%>if(UserData.Id > 0) { <%/csharp%>
            <td><b class="tdtitle">&nbsp;</b></td>
            <%csharp%> } <%/csharp%>
            </tr>
				<%csharp%>
				string str="tr_bgcolor_0";
				foreach(UserInfo item in PatientDataList) { 
				
				<%/csharp%>
					<tbody>
					    <tr height="60" class="{str}">
					    <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + item.Id; <%/csharp%>
						<td  align="center" style="padding:5px;">
						    <a href="{this.GetUrl(TempUrl)}" class="user_img" target="_blank"><img src="{item.Avatar}" height="48" width="48"></a></img><br />
                            <a href="{this.GetUrl(TempUrl)}">{item.UserName}</a><br />
						</td>
						
						<td  align="center">
						    <%csharp%> if (item.DiseaseId <= 0 || item.DiseaseName =="") { <%/csharp%>
						        <div class="content">
						            <p><b>未指定疾病</b></p>
						        </div>
							<%csharp%> } else { TempUrl = "/Disease.aspx?id=" + item.DiseaseId; <%/csharp%>
							    <a href="{this.GetUrl(TempUrl)}">{item.DiseaseName}</a>
							    <p><font color="#808080">
							    (<%csharp%>if(item.EnduringYear >= 1) { <%/csharp%> {item.EnduringYear}年 <%csharp%> } else { <%/csharp%>不到一年
							    <%csharp%> } <%/csharp%>)</font></p>
							<%csharp%> } <%/csharp%> <!-- End of is-else block  -->
						</td>
									
						
						<td  valign="middle" style="padding:15px;">			    
						      {item.Gender}/<%if item.Age>0&&item.Age<208%>{item.Age}<%else%>未知<%/if%>/

						    <%if item.Province!=""||item.City!=""%>{item.Province}&nbsp;{item.City}<%else%>未知<%/if%>
						
						</td>
						
						<%csharp%>
						    string sb=item.Description; 
						    if(sb.Length==0){sb="无";}
						    if(sb.Length>50){
						    sb=sb.Substring(0,Math.Min(50,sb.Length))+"……";}
						<%/csharp%>
						
						<td valign="middle">{sb}</td>
						
						<%csharp%>if(UserData.Id > 0) { <%/csharp%>
						<td  align="left" class="operatebutton">
						     <%csharp%>TempUrl = "/User/PostPm.aspx?msgto=" + item.Id; <%/csharp%>
						    <p><a href="{this.GetUrl(TempUrl)}" class="sendpm">发送消息</a></p>
						    
						    <%csharp%>TempUrl = "/User/FriendAdd.aspx?uid=" + item.Id; <%/csharp%>
							<p><a href="javascript:showFriendRequestDialog('{item.Id}','{item.UserName}','{item.Avatar}');" class="addfriend">加为好友</a></p>
						</td>
						<%csharp%> } <%/csharp%>
					    </tr>
					</tbody>
					<%csharp%>
					if(str=="tr_bgcolor_0") str="tr_bgcolor_1";
					else str="tr_bgcolor_0";
					
					
					}<%/csharp%>
				</table>				
				<%csharp%> } <%/csharp%>
	

        <%csharp%>TempUrl = ModuleCtrl.Footer("PatientList"); <%/csharp%>
        {TempUrl}		
		<div class="box">
			<div class="content">
				<div class="pages">
					{PatientPagingString}
				</div>
			</div>
		</div>
		
	</div>
	<div id="DIALOG"><iframe FRAMEBORDER=0 SCROLLING=NO ></iframe></div>
<script type="text/javascript" src="/support/Alpha/Js/float.js"></script>
	<div class="col2">
		<%template _UserLatest%>
		<%template _ActivePatient%>
	</div>
	
</div>

<%template _footer%>		
